
/**
 * 获取scriptTag DOM元素
 * require异步加载对应JS文件
 * @type @exp;document@call;getElementById
 */
var scriptTag = document.getElementById('scriptTag');
/**
 * 必加载项
 * jquery
 * bootstrap
 * util
 * spinner
 * sweetAlert
 * metisMenu
 * slimScroll
 * inspinia
 * @param {type} param
 */
if (scriptTag) {
    require.config({
        paths: {
            jquery: 'jquery-2.1.1',
            bootstrap: 'bootstrap.min',
            Util: 'util',
            Spinner: 'plugins/spinner/spinner.min',
            sweetAlert: 'plugins/sweetalert/sweetalert.min',
            metisMenu: 'plugins/metisMenu/jquery.metisMenu',
            slimScroll: 'plugins/slimscroll/jquery.slimscroll.min',
            inspinia: 'inspinia',
            uploadify: 'plugins/uploadify/jquery.uploadify.min',
            chosen: 'plugins/chosen/chosen.jquery',
            pagination: 'plugins/jquery-pagination/jquery.pagination',
            jQtmpl: 'plugins/jquery-tmpl/jquery.tmpl.min',
            datePicker: 'plugins/datapicker/bootstrap-datepicker',
            dateRangePicker: 'plugins/daterangepicker/daterangepicker',
            'moment': 'plugins/fullcalendar/moment.min',
            'fooTable': 'plugins/footable/footable.all.min'
        },
        shim: {
            'jquery': {
                exports: '$'
            },
            'bootstrap': {
                deps: ['jquery']
            },
            'metisMenu': {
                deps: ['jquery'],
                exports: 'metisMenu'
            },
            'sweetAlert': {
                deps: ['jquery']
            },
            'slimScroll': {
                deps: ['jquery'],
                exports: 'slimScroll'
            },
            'inspinia': {
                deps: ['jquery', 'bootstrap', 'metisMenu', 'slimScroll']
            },
            'uploadify': {
                deps: ['jquery']
            },
            'chosen': {
                deps: ['jquery']
            },
            'pagination': {
                deps: ['jquery']
            },
            'jQtmpl': {
                deps: ['jquery']
            },
            'moment': {
                deps: ['jquery']
            },
            'datePicker': {
                deps: ['jquery', 'moment']
            },
            'dateRangePicker': {
                deps: ['jquery', 'moment']
            },
            'fooTable': {
                deps: ['jquery']
            }
        },
        //urlArgs: "bust=1.5.3",
        urlArgs: "bust=" + (new Date()).getMonth().toString() + (new Date()).getDay().toString() + (new Date()).getHours().toString(),
        xhtml: true
    });
    require([scriptTag.innerHTML]);
}


